/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * NodeInfoFrame.java
 *
 * Created on 8-gen-2009, 16.42.43
 */

package lpr.minikazaa.GUI;

import lpr.minikazaa.bootstrap.NodeInfo;

/**
 *
 * @author giovine
 */
public class NodeInfoFrame extends javax.swing.JFrame {

    private NodeInfo my_info;
    /** Creates new form NodeInfoFrame */
    public NodeInfoFrame(NodeInfo infos) {
        this.my_info = infos;
        initComponents();
        this.infos.setText("" +
                "<html>" +
                "" + "<p><b>Ip Address: </b>"+this.my_info.getIaNode().toString().substring(1)+"</p>" +
                "<p><b>Port: </b>"+this.my_info.getDoor()+"</p>" +
                "<p><b>Id node: </b>"+this.my_info.getId()+"<p>" +
                "</html>");

    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        infos = new javax.swing.JLabel();
        close_bt = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setResizable(false);

        infos.setText("jLabel1");

        close_bt.setText("Close");
        close_bt.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                close_btActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(40, 40, 40)
                        .addComponent(infos, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(169, 169, 169)
                        .addComponent(close_bt)))
                .addContainerGap(30, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(31, 31, 31)
                .addComponent(infos, javax.swing.GroupLayout.PREFERRED_SIZE, 203, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(close_bt)
                .addContainerGap(21, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void close_btActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_close_btActionPerformed
        this.dispose();
    }//GEN-LAST:event_close_btActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton close_bt;
    private javax.swing.JLabel infos;
    // End of variables declaration//GEN-END:variables

}
